// pages/loupan/list.js
var app =getApp()
Page({

  /**
   * 页面的初始数据
   */
  data: {
    tuijian: '',
    type:'',
    limit:5,
		searchbnt: false,
		searchlimit: 5,
		searchvalue:'',
		showmenu1: true,
		showmenu2: true,
		showmenu3: true,
		showmenu4: true,
		areatype: 1, //默认是1 地区和学校的区分
		msgList: [
			{ key: 1, name: '区域' },
			{ key: 2, name: '类型' },
			{ key: 3, name: '价格' },
			{ key: 4, name: '筛选' }
		],
		areaul: [
			{ key: 1, active: true, name: '区域' },
			{ key: 2, active: false, name: '学区' },
		],
		arrschool: '',
		arealist: '',
		schoollist: '',
		studyarea: [
			{ key: 1, active: true, name: '不限' },
			{ key: 2, active: false, name: '合肥一中' },
			{ key: 3, active: false, name: '肥西三中' },
			{ key: 4, active: false, name: '合肥市青年小学' },
		],
		menu2_list: [
			{ key: 1, active: true, name: '不限', property_type: '' },
			{ key: 2, active: false, name: '住宅', property_type: 1 },
			{ key: 3, active: false, name: '商铺', property_type: 2 },
			{ key: 4, active: false, name: '写字楼', property_type: 3 },
			{ key: 5, active: false, name: '别墅', property_type: 4 },
			{ key: 6, active: false, name: '公寓', property_type: 5 },
			{ key: 7, active: false, name: '其他', property_type: 6 },
		],
		price_list: [
      { key: 1, active: true, name: '不限', low_price: '1', high_price: '300000000' },
			{
				key: 2, active: false, name: '7000以下',
				low_price: '1', high_price: '7000'
			},
			{
				key: 3, active: false, name: '7000-8000',
				low_price: '7000', high_price: '8000'
			},
			{
				key: 4, active: false, name: '8000-10000',
				low_price: '8000', high_price: '10000'
			},
			{
				key: 5, active: false, name: '10000-12000',
				low_price: '10000', high_price: '12000'
			},
			{
				key: 6, active: false, name: '12000-15000',
				low_price: '12000', high_price: '15000'
			},
			{
				key: 7, active: false, name: '15000-18000',
				low_price: '15000', high_price: '18000'
			},
			{
				key: 8, active: false, name: '18000-20000',
				low_price: '18000', high_price: '20000'
			},
			{
				key: 9, active: false, name: '20000以上',
				low_price: '20000', high_price: '300000000'
			},
		],
		sort: [
			{ key: 1, active: true, name: '不限', sort_field: 'sort', order: 'desc' },
			{ key: 2, active: false, name: '默认排序', sort_field: 'sort', order: 'desc' },
			{ key: 3, active: false, name: '价格由高到低', sort_field: 'averagePrice', order: 'desc' },
			{ key: 4, active: false, name: '价格由低到高', sort_field: 'averagePrice', order: 'asc' },
			{ key: 5, active: false, name: '人气由高到低', sort_field: 'hits', order: 'desc' },
			{ key: 6, active: false, name: '人气由低到高', sort_field: 'hits', order: 'asc' },
		],
		sort_field: 'sort',
		order: 'desc',
		huxing: [
			{ key: 1, active: true, name: '不限', bedroom: '' },
			{ key: 2, active: false, name: '一室', bedroom: '1' },
			{ key: 3, active: false, name: '二室', bedroom: '2' },
			{ key: 4, active: false, name: '三室', bedroom: '3' },
			{ key: 5, active: false, name: '四室', bedroom: '4' },
			{ key: 6, active: false, name: '五室', bedroom: '5' },
			{ key: 7, active: false, name: '五室以上', bedroom: '6' },
		],
		bedroom: '',

		mianji: [
			{ key: 1, active: true, name: '不限' },
			{ key: 2, active: false, name: '50㎡以下' },
			{ key: 3, active: false, name: '50-70㎡' },
			{ key: 4, active: false, name: '70-90㎡' },
			{ key: 5, active: false, name: '90-110㎡' },
			{ key: 6, active: false, name: '110-150㎡' },
			{ key: 7, active: false, name: '150-200㎡' },
			{ key: 8, active: false, name: '200-300㎡' },
			{ key: 9, active: false, name: '300㎡以上' },
		],
		xsmj: '',
		tese: [
			{ key: 1, active: true, name: '不限' },
			{ key: 2, active: false, name: '优惠' },
			{ key: 3, active: false, name: '毛坯' },
			{ key: 4, active: false, name: '简装' },
			{ key: 5, active: false, name: '精装' },
			{ key: 6, active: false, name: '公园地产' },
			{ key: 7, active: false, name: '地铁盘' },
		],
		park: '', // gongyuan
		renovate_state: '',//装修
		discount_info: '',// 类型 	
		subway_station: '', // 地铁盘
		tesetype: 1,// 0不限 1 类型 2 :装修 3:公园 4 地铁盘
		kaipan: [
			{ key: 1, active: true, name: '不限' },
			{ key: 2, active: false, name: '本月开盘' },
			{ key: 3, active: false, name: '下月开盘' },
			{ key: 4, active: false, name: '近3个月开盘' },
			{ key: 5, active: false, name: '半年内开盘' },
			{ key: 6, active: false, name: '一年内开盘' },
		],
		xiaoshou: [
			{
				key: 1, active: true, name: '不限', sale_state: ''
			},
			{ key: 2, active: false, name: '待售', sale_state: 1 },
			{ key: 3, active: false, name: '在售', sale_state: 2 },
			{ key: 4, active: false, name: '尾盘', sale_state: 3 },
			{ key: 5, active: false, name: '售完', sale_state: 4 },

		],
		sale_state: '', // 销售状态
		kaifashang: [
			{ key: 1, active: true, name: '不限' },
			{ key: 2, active: false, name: '万科' },
			{ key: 3, active: false, name: '保利' },
			{ key: 4, active: false, name: '绿地' },
			{ key: 5, active: false, name: '恒大' },
			{ key: 6, active: false, name: '华润' },
			{ key: 7, active: false, name: '文一' },
			{ key: 8, active: false, name: '万达' },
			{ key: 9, active: false, name: '华邦' },
			{ key: 10, active: false, name: '中海' },
			{ key: 11, active: false, name: '信达' },

		],
		searchvalue: '', // 输入框内容
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var that = this;
    var type =options.type
    that.setData({
      type:type
    })
    that.list(type,5)
		that.httpsgetarea();
  },

    list(type,limit){
			wx.showLoading({
				            title: '加载中',
			          })
      var that =this;
      var url=''
			var setid = app.globalData.cityCode;
      if(type == 1){
				url = "get_tj_more_list/site_id/" + setid +"/limit/"+limit+"";
      }else if(type ==2){
				url = "get_youhui_houses/site_id/"+ setid+"/limit/" + limit + "";
      }
      else if(type ==3){

      }
      app.core('get',url,'',(res=>{
        console.log(res);
        that.setData({
          tuijian:res.data,
          limit:limit+5
        });
				wx.hideLoading()
      }))
    },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {
    var that =this;
		var typesss = that.data.searchbnt;
		var searchlimit = that.data.searchlimit;
    console.log(this.data.limit);
    var limit= that.data.limit;
    var type = that.data.type;
	if(typesss == false){
		console.log(limit);

		that.list(type, limit)
	}else{
		var searchvalue = that.data.searchvalue;
		that.searchlistsss(searchvalue, searchlimit);
		console.log(222)
	}

   
  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  },

	// 菜单
	tuijian(id) {
		var that = this;
		 var setid = app.globalData.cityCode;
		wx.showLoading({
			            title: '加载中',
		          })
		app.core('get', 'get_recommend_houses/site_id/' + setid +'/limit/100', {},
			(res) => {
				console.log(res, 'tuijian')
				that.setData({
					tuijian: res.data
				})
				wx.hideLoading()
			}
		)
	},
	// 推荐楼盘
	tuijianarea(id, type) {
		var that = this;
		var setid =app.globalData.cityCode;
		wx.showLoading({
			            title: '加载中',
		          })
		if (type == 1) {
			app.core('get', 'get_recommend_houses/site_id/' + setid+'/limit/100', {
				area_id: id
			},
				(res) => {
					console.log(res, 'tuijian')
					that.setData({
						tuijian: res.data
					})
					wx.hideLoading()
				}
			)
		} else {
			wx.showLoading({
				            title: '加载中',
			          })
			app.core('get', 'get_recommend_houses/site_id/' + setid +'/limit/100', {
				school_id: id
			},
				(res) => {
					console.log(res, 'tuijian')
					that.setData({
						tuijian: res.data
					});
					wx.hideLoading()
				}
			)
		}

	},
// 地区筛选

	// 菜单
	httpsgetarea() {
		var that = this;
		wx.showLoading({
			            title: '加载中',
		          })
		var setid = app.globalData.cityCode; // 城市id
		app.core('get', 'get_search_condition/site_id/' + setid +'', '', (res => {
			console.log(res)


			var newarea = [];
			var area = res.data.areas;
			for (var i = 0; i < area.length; i++) {
				newarea.push(area[i])
				newarea[i].active = false;
				newarea[i].name = area[i].areaName
			}
			var area_fir = {
				name: '不限',
				active: true
			}
			newarea.unshift(area_fir)
			console.log(newarea, 'newarea')
			that.setData({
				arrschool: newarea,
				arealist: newarea
			})
			// 区县结束

			// 学区开始
			var school = res.data.schools;
			var newschool = [];
			for (var i = 0; i < school.length; i++) {
				newschool.push(school[i])
				newschool[i].active = false;

			}
			var school_fir = {
				name: '不限',
				active: true
			}
			newschool.unshift(school_fir)
			console.log(newschool, 'newschool')
			that.setData({
				schoollist: newschool
			})

			// 类型开始
			var housetype = res.data.types;
			var newtype = [];
			for (var i = 0; i < housetype.length; i++) {
				newtype.push(school[i])
				newtype[i].active = false;
			}
			var type_fir = {
				name: '不限',
				active: true
			}
			newtype.unshift(school_fir)
			that.setData({
				schoollist: newschool
			})
			wx.hideLoading()
		}))
	},
	// 请求后台获取地区或者学区


	checkschool(e) {

		var that = this;
		var index = e.target.dataset.index;
		var arr = that.data.areaul;
		for (var i = 0; i < arr.length; i++) {
			if (index == i) {
				arr[i].active = true;
			}
			else {
				arr[i].active = false
			}
		}
		//11111111
		var arealist = that.data.arealist;
		var schoollist = that.data.schoollist;
		console.log(index)
		if (index == 1) {
			that.setData({
				arrschool: schoollist,
				areatype: 2 // xuexiao
			}) // xuexiao
		} else {
			that.setData({
				arrschool: arealist,
				areatype: 1 // diqu
			}) // diqu 
		}
		console.log(arr, index)
		that.setData({
			areaul: arr
		})

	},
	checkareass(e) {
		// 地区筛选列表 
		var that = this;
		var index = e.target.dataset.index;
		var areatype = that.data.areatype; // 区分地区还是学校
		var id = e.target.dataset.id; // 地区id

		var arr = that.data.arealist; // 地区列表
		var school = that.data.schoollist; // 学校列表
		var name = '';
		if (areatype == 1) {
			arr = that.data.arealist;
			var area_id = arr[index].id;
			that.tuijianarea(area_id, 1)
		} else {
			arr = that.data.schoollist;
			var school_id = arr[index].id;
			that.tuijianarea(school_id, 2)
		}
		for (var i = 0; i < arr.length; i++) {
			if (i == index) {
				arr[index].active = true;
				name = arr[index].name;

			} else {
				arr[i].active = false
			}
		}
		var arrss = that.data.msgList;

		arrss[0].name = name;
		that.setData({

			msgList: arrss,
			showmenu1: true
		})


	},
	// 

	checktype(e) {
		var that = this;
		var index = e.currentTarget.dataset.index;
		var property_type = e.currentTarget.dataset.property_type;
		var arr = that.data.menu2_list;
		var name = ''

		for (var i = 0; i < arr.length; i++) {
			if (i == index) {
				arr[index].active = true;
				console.log(index)
				name = arr[index].name
			} else {
				arr[i].active = false
			}
		}
		var arrss = that.data.msgList;

		arrss[1].name = name;
		that.setData({
			menu2_list: arr,
			msgList: arrss,
			showmenu2: true
		})
		that.tuijiantype(property_type)
	},
	tuijiantype(e) {
		wx.showLoading({
			            title: '加载中',
		          })
		var that = this;
		var setid = app.globalData.cityCode;
		app.core('get', 'get_tj_more_list/site_id/' + setid +'/limit/100', {
			property_type: e
		},
			(res) => {
				console.log(res, 'tuijian')
				that.setData({
					tuijian: res.data
				})
				wx.hideLoading()
			}
		)
	}, // 根据类型区分
	// 

	checkprice(e) {
		//价格筛选
		var that = this;
		var index = e.currentTarget.dataset.index;
		var low_price = e.currentTarget.dataset.lowprice;
		var high_price = e.currentTarget.dataset.highprice
		var arr = that.data.price_list;
		var name = ''
		var high_price = ''; // 最高 价
		var low_price = ''; // 最低价
		for (var i = 0; i < arr.length; i++) {
			if (i == index) {
				arr[index].active = true;
				console.log(index)
				name = arr[index].name;
				high_price = arr[index].high_price;
				low_price = arr[index].low_price;
			} else {
				arr[i].active = false
			}
			if (high_price && low_price) {
				//如果高价低价都存在的情况下，执行请求
			}
		}
		var arrss = that.data.msgList;

		arrss[2].name = name;
		that.setData({
			price_list: arr,
			msgList: arrss,
			showmenu3: true
		})
		that.tuijianprice(low_price, high_price)
	},
	tuijianprice(low, high) {
		var that = this;
		wx.showLoading({
			            title: '加载中',
		          })
		var setid = app.globalData.cityCode;
		app.core('get', 'get_recommend_houses/site_id/' + setid +'/limit/100', {
			low_price: low,
			high_price: high
		},
			(res) => {
				console.log(res, 'tuijian')
				that.setData({
					tuijian: res.data
				});
				wx.hideLoading()
			}
		)
	},// 价格推荐


	menuclickss(e) {
		var that = this;
		var index = e.currentTarget.dataset.index;
		var showmenu1 = that.data.showmenu1;
		var showmenu2 = that.data.showmenu2;
		var showmenu3 = that.data.showmenu3;
		var showmenu4 = that.data.showmenu4;
		console.log(index, showmenu1)

		if (index == 0) {
			that.setData({
				showmenu1: !showmenu1,
				showmenu2: true,
				showmenu3: true,
				showmenu4: true
			})
		} else if (index == 1) {
			that.setData({
				showmenu2: !showmenu2,
				showmenu1: true,
				showmenu3: true,
				showmenu4: true
			})
		}
		else if (index == 2) {
			that.setData({
				showmenu3: !showmenu3,
				showmenu1: true,
				showmenu2: true,
				showmenu4: true
			})
		}
		else if (index == 3) {
			that.setData({
				showmenu4: !showmenu4,
				showmenu1: true,
				showmenu2: true,
				showmenu3: true
			})
		}

	},

	checksort(e) {
		//筛选的排序
		var that = this;
		var index = e.currentTarget.dataset.index;
		var arr = that.data.sort;
		var sort_field = ''; var order = ""
		for (var i = 0; i < arr.length; i++) {
			if (index == i) {
				arr[i].active = true;
				sort_field = arr[i].sort_field;
				order = arr[i].order;
				that.setData({
					sort_field: sort_field,
					order: order
				})
			} else {
				arr[i].active = false
			}
		}
		that.setData({
			sort: arr
		})
	},
	checkhuxing(e) {
		// 筛选户型
		var that = this;
		var index = e.currentTarget.dataset.index;
		var arr = that.data.huxing;
		var bedroom = "";
		for (var i = 0; i < arr.length; i++) {
			if (index == i) {
				arr[i].active = true
				bedroom = arr[i].bedroom;
				that.setData({
					bedroom: bedroom
				})
			} else {
				arr[i].active = false
			}
		}
		that.setData({
			huxing: arr
		})
	},

	// checkhuxing(e) {
	// 	var that = this;
	// 	var index = e.currentTarget.dataset.index;
	// 	var arr = that.data.huxing;
	// 	for (var i = 0; i < arr.length; i++) {
	// 		if (index == i) {
	// 			arr[i].active = true
	// 		} else {
	// 			arr[i].active = false
	// 		}
	// 	}
	// 	that.setData({
	// 		huxing: arr
	// 	})
	// },

	checkarea(e) {
		// 筛选面积
		var that = this;
		var index = e.currentTarget.dataset.index;
		var arr = that.data.mianji;
		var xsmj = "";
		for (var i = 0; i < arr.length; i++) {
			if (index == i) {
				arr[i].active = true;
				xsmj = arr[i].name;
				that.setData({
					xsmj: xsmj
				})
			} else {
				arr[i].active = false
			}
		}
		that.setData({
			mianji: arr
		})
	},


	checktese(e) {
		var that = this;
		var index = e.currentTarget.dataset.index;
		var arr = that.data.tese;
		var tese = '';
		for (var i = 0; i < arr.length; i++) {
			if (index == i) {
				arr[i].active = true;
				if (arr[i].name == '毛坯' || arr[i].name == '简装' || arr[i].name == '精装') {

					if (arr[i].name == '毛坯') {
						tese: 1
					} else if (arr[i].name == '简装') {
						tese: 2
					} else if (arr[i].name == '精装') {
						tese: 3
					}

					that.setData({
						tesetype: 2,
						renovate_state: tese
					})

				} else if (arr[i].name == '公园地产') {
					tese = '公园'
					that.setData({
						tesetype: 3,
						park: tese
					})
				}
				else if (arr[i].name == '地铁盘') {
					tese = '地铁盘'
					that.setData({
						tesetype: 4,
						subway_station: tese
					})
				} else if (arr[i].name == '优惠') {
					tese = arr[i].name
					that.setData({
						tesetype: 1,
						discount_info: tese
					})
				} else {
					that.setData({
						tesetype: 0,
						discount_info: ''
					})
				}
				// 判断装修情况



			} else {
				arr[i].active = false
			}
		}
		that.setData({
			tese: arr
		})
	},

	checkkaipan(e) {
		var that = this;
		var index = e.currentTarget.dataset.index;
		var arr = that.data.kaipan;
		for (var i = 0; i < arr.length; i++) {
			if (index == i) {
				arr[i].active = true
			} else {
				arr[i].active = false
			}
		}
		that.setData({
			kaipan: arr
		})
	},

	checkxiaoshou(e) {
		var that = this;
		var index = e.currentTarget.dataset.index;
		var arr = that.data.xiaoshou;
		var sale_state = "";
		for (var i = 0; i < arr.length; i++) {
			if (index == i) {
				arr[i].active = true;
				sale_state = arr[i].sale_state;
				that.setData({
					sale_state: sale_state
				})
			} else {
				arr[i].active = false
			}
		}
		that.setData({
			xiaoshou: arr
		})
	},

	checkkaifashang(e) {
		var that = this;
		var index = e.currentTarget.dataset.index;
		var arr = that.data.kaifashang;
		for (var i = 0; i < arr.length; i++) {
			if (index == i) {
				arr[i].active = true
			} else {
				arr[i].active = false
			}
		}
		that.setData({
			kaifashang: arr
		})
	},
	yessubmit() {
		var that = this;
		var sort_field = that.data.sort_field;
		var order = that.data.order;
		// 排序
		var bedroom = that.data.bedroom;
		//户型
		var xsmj = that.data.xsmj;
		//面积
		var sale_state = that.data.sale_state;
		// 销售状态
		var tesetype = that.data.tesetype;
		// 楼盘特色判断情况
		var renovate_state = that.data.renovate_state

		var park = that.data.park

		var subway_station = that.data.subway_station

		var discount_info = that.data.discount_info
		var data = ""
		if (tesetype == 0) {
			data = {
				sort_field: sort_field,
				order: order,
				bedroom: bedroom,
				xsmj: xsmj,
				sale_state: sale_state,
				discount_info: ''
			}
		} else if (tesetype == 1) {
			data = {
				sort_field: sort_field,
				order: order,
				bedroom: bedroom,
				xsmj: xsmj,
				sale_state: sale_state,
				discount_info: discount_info
			}
		}
		else if (tesetype == 2) {
			data = {
				sort_field: sort_field,
				order: order,
				bedroom: bedroom,
				xsmj: xsmj,
				sale_state: sale_state,
				renovate_state: renovate_state
			}
		}
		else if (tesetype == 3) {
			data = {
				sort_field: sort_field,
				order: order,
				bedroom: bedroom,
				xsmj: xsmj,
				sale_state: sale_state,
				park: park
			}
		}
		else if (tesetype == 3) {
			data = {
				sort_field: sort_field,
				order: order,
				bedroom: bedroom,
				xsmj: xsmj,
				sale_state: sale_state,
				subway_station: subway_station
			}
		}

		that.shaixuantuijian(data)
		that.setData({
			showmenu4: true
		})
	},
	shaixuantuijian(data) {
		var that = this;
		var setid = app.globalData.cityCode;
		wx.showLoading({
			            title: '加载中',
		          })
		app.core('get', 'get_recommend_houses/site_id/' + setid +'/limit/100', data,
			(res) => {
				console.log(res, 'tuijian')
				that.setData({
					tuijian: res.data
				});
				wx.hideLoading()
			}
		)
	},//筛选多情况
	cancels() {
		var that = this;
		var sort = this.data.sort
		var huxing = this.data.huxing
		var area = this.data.mianji
		var tese = this.data.tese
		var kaipan = this.data.kaipan
		var xiaoshou = this.data.xiaoshou
		var kaifashang = this.data.kaifashang
		that.cancelsss(sort, 'sort')
		that.cancelsss(huxing, 'huxing')
		that.cancelsss(area, 'area')
		that.cancelsss(tese, 'tese')
		that.cancelsss(kaipan, 'kaipan')
		that.cancelsss(xiaoshou, 'xiaoshou')
		that.cancelsss(kaifashang, 'kaifashang')
	},

	cancelsss(arr, e) {

		for (var i = 0; i < arr.length; i++) {
			arr[i].active = false;

		}
		arr[0].active = true;

		if (e == 'sort') {
			this.setData({
				sort: arr
			})
		} else if (e == 'huxing') {
			this.setData({
				huxing: arr
			})
		}
		else if (e == 'area') {
			this.setData({
				mianji: arr
			})
		}
		else if (e == 'tese') {
			this.setData({
				tese: arr
			})
		}
		else if (e == 'kaipan') {
			this.setData({
				kaipan: arr
			})
		}
		else if (e == 'xiaoshou') {
			this.setData({
				xiaoshou: arr
			})
		}
		else if (e == 'kaifashang') {
			this.setData({
				kaifashang: arr
			})
		}



	},
	//控制菜单显示隐藏
  /**
   * 生命周期函数--监听页面显示
   */


	// onReachBottom: function () {
	// 	var limit = this.data.limit
	// 	var that = this
	// 	var type = that.data.searchbnt;
	// 	var searchlimit = that.data.searchlimit;
	// 	if (type == false) {
	// 		this.list(type,limit)
	// 	}
	// 	else {

	// 		var searchvalue = that.data.searchvalue;
	// 		that.searchlistsss(searchvalue, searchlimit);
	// 		console.log(222)
	// 	}

	// },

	searchdesc() {

		var that = this;
		var setid = app.globalData.cityCode;
		var searchvalue = that.data.searchvalue;
		if (searchvalue == '') {
			wx.showToast({
				title: '请输入内容',
				duration: 1000,
				icon: 'none'
			})
		} else {
			that.searchlistsss(searchvalue, 6)
		}

	},
	searchlistsss(searchvalue, limit) {
		wx.showLoading({
			title: '加载中',
		})
		var that = this;
		var setid = app.globalData.cityCode;
		app.core('get', 'get_tj_more_list/site_id/' + setid + '/limit/' + limit + '', {
			keywords: searchvalue
		}, (res) => {
			console.log(res)
		if(res.data.length != 0){
			that.setData({
				searchbnt: true,
				searchlimit: limit + 5,
				ershou: res.data
			})
		
		}else{
			wx.showToast({
				title: '暂无搜索内容',
				duration: 1000,
				icon: 'none'
			})
		}

			wx.hideLoading()
		})
	},
	searchlist(e) {
		this.setData({
			searchvalue: e.detail.value
		})
	},
})